<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script type="text/javascript">
    window.onload =function () {
        // 电话号码 000-123456 或 13866666666
        var reg = /^(([0]{3}[-]{1}\d{8})|([1]{1}[3578]{1}\d{9}))$/;
        console.log(reg.test('000-12345678'));
        console.log(reg.test(15866666666));

        // xxx@xxx.com 或 xxx@xxx.cn
        var reg1 = /^([0-9a-zA-Z]{3}[@]{1}[0-9a-zA-Z]{3}((.com)|(.cn)))$/;
        console.log(reg1.test("1Q3@133.com"));
        console.log(reg1.test("111@1a1.cn"));

    }
</script>